/**
 * 自动生成！请勿修改！
// note:特殊的寄居蟹的内容实现input不能和之前的一样，所以过滤一下这个设备，
// 可以做一个过滤器，将这个JeejioHub过滤掉。
 */
import { command } from '../core/command';

class JeejioHub {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010100011';
    }

    get categoryName() {
        return '\u7626\u897f\u6e56\u5f00\u53d1\u677f';
    }

    getDevMessage(params) {
        return command({
            method: 'getDevMessage',
            methodId: '',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setClear(params) {
        return command({
            method: 'setDevMessage',
            methodId: '',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDevMessageImage(params) {
        return command({
            method: 'setDevMessage',
            methodId: '',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDevMessageText(params) {
        return command({
            method: 'setDevMessage',
            methodId: '',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
    // 新增灯的api：控制开关
    setSwitchLed(params) {
        return command({
            method: 'setDevMessage',
            methodId: '',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default JeejioHub;
